.class public Lcom/netease/newsreader/activity/SettingsActivity;
.super Landroid/preference/PreferenceActivity;
.source "SettingsActivity.java"

# interfaces
.implements Lcom/netease/newsreader/util/ThemeSettingsHelper$ThemeCallback;


# static fields
.field private static final ABOUT_KEY:Ljava/lang/String; = "about"

.field private static final ACCOUNT_KEY:Ljava/lang/String; = "account"

.field private static final AUTOPOST_KEY:Ljava/lang/String; = "autopost"

.field public static final CACHE_KEY:Ljava/lang/String; = "cache"

.field public static final DOWN_PIC_KEY:Ljava/lang/String; = "downpic"

.field private static final FEED_KEY:Ljava/lang/String; = "feedback"

.field private static final LEFTRIGHTCTRL:Ljava/lang/String; = "leftrightctrl"

.field private static final NEWGUIDE_KEY:Ljava/lang/String; = "newguide"

.field public static final OFFLINE_READ_KEY:Ljava/lang/String; = "autodownload"

.field private static final SCREENCTRL:Ljava/lang/String; = "screenctrl"


# instance fields
.field private appdata:Lcom/netease/newsreader/activity/MyApplication;

.field private handler:Landroid/os/Handler;

.field private mPaused:Z

.field private mThemeChanged:Z

.field private mThemeSettingsHelper:Lcom/netease/newsreader/util/ThemeSettingsHelper;

.field private menuDefaultListener:Landroid/view/View$OnClickListener;

.field private menuHomeListener:Landroid/view/View$OnClickListener;

.field private menuWindow:Landroid/widget/PopupWindow;

.field private menu_2:Landroid/view/View;

.field private menu_defaule:Landroid/widget/LinearLayout;

.field private menu_display:Z

.field private menu_home:Landroid/widget/LinearLayout;

.field private progressDialog:Landroid/app/ProgressDialog;

.field private sp:Landroid/content/SharedPreferences;


# direct methods
.method public constructor <init>()V
    .locals 1

    .prologue
    .line 38
    invoke-direct {p0}, Landroid/preference/PreferenceActivity;-><init>()V

    .line 210
    new-instance v0, Lcom/netease/newsreader/activity/SettingsActivity$1;

    invoke-direct {v0, p0}, Lcom/netease/newsreader/activity/SettingsActivity$1;-><init>(Lcom/netease/newsreader/activity/SettingsActivity;)V

    iput-object v0, p0, Lcom/netease/newsreader/activity/SettingsActivity;->handler:Landroid/os/Handler;

    .line 291
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menu_display:Z

    .line 368
    new-instance v0, Lcom/netease/newsreader/activity/SettingsActivity$2;

    invoke-direct {v0, p0}, Lcom/netease/newsreader/activity/SettingsActivity$2;-><init>(Lcom/netease/newsreader/activity/SettingsActivity;)V

    iput-object v0, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menuDefaultListener:Landroid/view/View$OnClickListener;

    .line 401
    new-instance v0, Lcom/netease/newsreader/activity/SettingsActivity$3;

    invoke-direct {v0, p0}, Lcom/netease/newsreader/activity/SettingsActivity$3;-><init>(Lcom/netease/newsreader/activity/SettingsActivity;)V

    iput-object v0, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menuHomeListener:Landroid/view/View$OnClickListener;

    .line 433
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/netease/newsreader/activity/SettingsActivity;->mPaused:Z

    .line 38
    return-void
.end method

.method static synthetic access$0(Lcom/netease/newsreader/activity/SettingsActivity;)Landroid/app/ProgressDialog;
    .locals 1
    .parameter

    .prologue
    .line 56
    iget-object v0, p0, Lcom/netease/newsreader/activity/SettingsActivity;->progressDialog:Landroid/app/ProgressDialog;

    return-object v0
.end method

.method static synthetic access$1(Lcom/netease/newsreader/activity/SettingsActivity;)Landroid/content/SharedPreferences;
    .locals 1
    .parameter

    .prologue
    .line 51
    iget-object v0, p0, Lcom/netease/newsreader/activity/SettingsActivity;->sp:Landroid/content/SharedPreferences;

    return-object v0
.end method

.method static synthetic access$2(Lcom/netease/newsreader/activity/SettingsActivity;)Landroid/widget/PopupWindow;
    .locals 1
    .parameter

    .prologue
    .line 290
    iget-object v0, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menuWindow:Landroid/widget/PopupWindow;

    return-object v0
.end method

.method static synthetic access$3(Lcom/netease/newsreader/activity/SettingsActivity;Z)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 291
    iput-boolean p1, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menu_display:Z

    return-void
.end method

.method static synthetic access$4(Lcom/netease/newsreader/activity/SettingsActivity;)Landroid/os/Handler;
    .locals 1
    .parameter

    .prologue
    .line 210
    iget-object v0, p0, Lcom/netease/newsreader/activity/SettingsActivity;->handler:Landroid/os/Handler;

    return-object v0
.end method

.method private setMenu()V
    .locals 6

    .prologue
    const/4 v5, 0x0

    .line 298
    const-string v2, "layout_inflater"

    invoke-virtual {p0, v2}, Lcom/netease/newsreader/activity/SettingsActivity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/LayoutInflater;

    .line 299
    .local v0, inflater:Landroid/view/LayoutInflater;
    const v2, 0x7f03000b

    const/4 v3, 0x0

    invoke-virtual {v0, v2, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v1

    .line 300
    .local v1, layout:Landroid/view/View;
    new-instance v2, Landroid/widget/PopupWindow;

    const/4 v3, -0x1

    const/4 v4, -0x2

    invoke-direct {v2, v1, v3, v4}, Landroid/widget/PopupWindow;-><init>(Landroid/view/View;II)V

    iput-object v2, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menuWindow:Landroid/widget/PopupWindow;

    .line 302
    iget-object v2, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menuWindow:Landroid/widget/PopupWindow;

    const v3, 0x7f0a002f

    invoke-virtual {v2, v3}, Landroid/widget/PopupWindow;->setAnimationStyle(I)V

    .line 303
    const v2, 0x7f0c0037

    invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    iput-object v2, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menu_2:Landroid/view/View;

    .line 304
    const v2, 0x7f0c003a

    invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/LinearLayout;

    iput-object v2, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menu_defaule:Landroid/widget/LinearLayout;

    .line 305
    const v2, 0x7f0c003b

    invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/LinearLayout;

    iput-object v2, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menu_home:Landroid/widget/LinearLayout;

    .line 306
    iget-object v2, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menu_defaule:Landroid/widget/LinearLayout;

    invoke-virtual {v2, v5}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 307
    iget-object v2, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menu_home:Landroid/widget/LinearLayout;

    invoke-virtual {v2, v5}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 309
    iget-object v2, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menu_defaule:Landroid/widget/LinearLayout;

    iget-object v3, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menuDefaultListener:Landroid/view/View$OnClickListener;

    invoke-virtual {v2, v3}, Landroid/widget/LinearLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 310
    iget-object v2, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menu_home:Landroid/widget/LinearLayout;

    iget-object v3, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menuHomeListener:Landroid/view/View$OnClickListener;

    invoke-virtual {v2, v3}, Landroid/widget/LinearLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 311
    return-void
.end method


# virtual methods
.method public applyTheme()V
    .locals 1

    .prologue
    .line 437
    iget-boolean v0, p0, Lcom/netease/newsreader/activity/SettingsActivity;->mPaused:Z

    if-eqz v0, :cond_0

    .line 438
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/netease/newsreader/activity/SettingsActivity;->mThemeChanged:Z

    .line 442
    :goto_0
    return-void

    .line 440
    :cond_0
    invoke-virtual {p0}, Lcom/netease/newsreader/activity/SettingsActivity;->onApplyTheme()V

    goto :goto_0
.end method

.method public dispatchTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 3
    .parameter "ev"

    .prologue
    .line 352
    iget-object v2, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menuWindow:Landroid/widget/PopupWindow;

    invoke-virtual {v2}, Landroid/widget/PopupWindow;->isShowing()Z

    move-result v2

    if-eqz v2, :cond_0

    .line 353
    iget-object v2, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menuWindow:Landroid/widget/PopupWindow;

    invoke-virtual {v2}, Landroid/widget/PopupWindow;->dismiss()V

    .line 354
    const/4 v2, 0x0

    iput-boolean v2, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menu_display:Z

    .line 356
    :cond_0
    const/4 v1, 0x0

    .line 358
    .local v1, result:Z
    :try_start_0
    invoke-super {p0, p1}, Landroid/preference/PreferenceActivity;->dispatchTouchEvent(Landroid/view/MotionEvent;)Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result v1

    .line 362
    :goto_0
    return v1

    .line 359
    :catch_0
    move-exception v0

    .line 360
    .local v0, e:Ljava/lang/Exception;
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method

.method public getThemeSettingsHelper()Lcom/netease/newsreader/util/ThemeSettingsHelper;
    .locals 1

    .prologue
    .line 445
    iget-object v0, p0, Lcom/netease/newsreader/activity/SettingsActivity;->mThemeSettingsHelper:Lcom/netease/newsreader/util/ThemeSettingsHelper;

    return-object v0
.end method

.method public goBackClick(Landroid/view/View;)V
    .locals 0
    .parameter "view"

    .prologue
    .line 347
    invoke-virtual {p0}, Lcom/netease/newsreader/activity/SettingsActivity;->finish()V

    .line 348
    return-void
.end method

.method public onApplyTheme()V
    .locals 6

    .prologue
    const v5, 0x7f080011

    const v4, 0x7f02007e

    const/4 v3, 0x1

    .line 452
    invoke-virtual {p0}, Lcom/netease/newsreader/activity/SettingsActivity;->getThemeSettingsHelper()Lcom/netease/newsreader/util/ThemeSettingsHelper;

    move-result-object v0

    .line 453
    .local v0, themeSettingsHelper:Lcom/netease/newsreader/util/ThemeSettingsHelper;
    const v1, 0x7f0c0008

    const v2, 0x7f080025

    invoke-virtual {v0, p0, v1, v2}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setTextViewColor(Landroid/app/Activity;II)V

    .line 454
    const v1, 0x7f0c006f

    const v2, 0x7f020089

    invoke-virtual {v0, p0, v1, v2}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setImageViewSrc(Landroid/app/Activity;II)V

    .line 455
    const v1, 0x7f0c0007

    const v2, 0x7f0200fe

    invoke-virtual {v0, p0, v1, v2}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setViewBackgroud(Landroid/app/Activity;II)V

    .line 456
    const v1, 0x7f0c0139

    const v2, 0x7f080029

    invoke-virtual {v0, p0, v1, v2}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setViewBackgroudColor(Landroid/app/Activity;II)V

    .line 457
    invoke-virtual {p0}, Lcom/netease/newsreader/activity/SettingsActivity;->getListView()Landroid/widget/ListView;

    move-result-object v1

    const v2, 0x7f020070

    invoke-virtual {v0, p0, v1, v2}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setListViewDivider(Landroid/content/Context;Landroid/widget/ListView;I)V

    .line 458
    invoke-virtual {p0}, Lcom/netease/newsreader/activity/SettingsActivity;->getListView()Landroid/widget/ListView;

    move-result-object v1

    invoke-virtual {v1}, Landroid/widget/ListView;->requestLayout()V

    .line 461
    iget-object v1, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menu_2:Landroid/view/View;

    const v2, 0x7f080015

    invoke-virtual {v0, p0, v1, v2}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setViewBackgroudColor(Landroid/content/Context;Landroid/view/View;I)V

    .line 462
    iget-object v1, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menu_defaule:Landroid/widget/LinearLayout;

    invoke-virtual {v0, p0, v1, v4}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setViewBackgroud(Landroid/content/Context;Landroid/view/View;I)V

    .line 463
    iget-object v1, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menu_defaule:Landroid/widget/LinearLayout;

    invoke-virtual {v1, v3}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    invoke-virtual {v0, p0, v1, v5}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setTextViewColor(Landroid/content/Context;Landroid/widget/TextView;I)V

    .line 464
    iget-object v1, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menu_home:Landroid/widget/LinearLayout;

    invoke-virtual {v0, p0, v1, v4}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setViewBackgroud(Landroid/content/Context;Landroid/view/View;I)V

    .line 465
    iget-object v1, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menu_home:Landroid/widget/LinearLayout;

    invoke-virtual {v1, v3}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    invoke-virtual {v0, p0, v1, v5}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setTextViewColor(Landroid/content/Context;Landroid/widget/TextView;I)V

    .line 467
    const v1, 0x7f0c0002

    const v2, 0x7f020041

    invoke-virtual {v0, p0, v1, v2}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setImageViewSrc(Landroid/app/Activity;II)V

    .line 468
    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 2
    .parameter "savedInstanceState"

    .prologue
    .line 60
    const/4 v1, 0x1

    invoke-virtual {p0, v1}, Lcom/netease/newsreader/activity/SettingsActivity;->requestWindowFeature(I)Z

    .line 63
    invoke-super {p0, p1}, Landroid/preference/PreferenceActivity;->onCreate(Landroid/os/Bundle;)V

    .line 64
    invoke-static {p0}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->getThemeSettingsHelper(Landroid/content/Context;)Lcom/netease/newsreader/util/ThemeSettingsHelper;

    move-result-object v1

    iput-object v1, p0, Lcom/netease/newsreader/activity/SettingsActivity;->mThemeSettingsHelper:Lcom/netease/newsreader/util/ThemeSettingsHelper;

    .line 65
    iget-object v1, p0, Lcom/netease/newsreader/activity/SettingsActivity;->mThemeSettingsHelper:Lcom/netease/newsreader/util/ThemeSettingsHelper;

    invoke-virtual {v1, p0}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->registerThemeCallback(Lcom/netease/newsreader/util/ThemeSettingsHelper$ThemeCallback;)V

    .line 68
    const v1, 0x7f030061

    invoke-virtual {p0, v1}, Lcom/netease/newsreader/activity/SettingsActivity;->setContentView(I)V

    .line 69
    const/high16 v1, 0x7f05

    invoke-virtual {p0, v1}, Lcom/netease/newsreader/activity/SettingsActivity;->addPreferencesFromResource(I)V

    .line 71
    const v1, 0x7f0c0008

    invoke-virtual {p0, v1}, Lcom/netease/newsreader/activity/SettingsActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    .line 72
    .local v0, title:Landroid/widget/TextView;
    const v1, 0x7f0b0086

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V

    .line 74
    invoke-virtual {p0}, Lcom/netease/newsreader/activity/SettingsActivity;->getApplication()Landroid/app/Application;

    move-result-object v1

    check-cast v1, Lcom/netease/newsreader/activity/MyApplication;

    iput-object v1, p0, Lcom/netease/newsreader/activity/SettingsActivity;->appdata:Lcom/netease/newsreader/activity/MyApplication;

    .line 76
    invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v1

    iput-object v1, p0, Lcom/netease/newsreader/activity/SettingsActivity;->sp:Landroid/content/SharedPreferences;

    .line 78
    new-instance v1, Lcom/netease/newsreader/activity/SettingsActivity$4;

    invoke-direct {v1, p0}, Lcom/netease/newsreader/activity/SettingsActivity$4;-><init>(Lcom/netease/newsreader/activity/SettingsActivity;)V

    .line 101
    invoke-virtual {v1}, Lcom/netease/newsreader/activity/SettingsActivity$4;->start()V

    .line 103
    invoke-direct {p0}, Lcom/netease/newsreader/activity/SettingsActivity;->setMenu()V

    .line 105
    new-instance v1, Landroid/app/ProgressDialog;

    invoke-direct {v1, p0}, Landroid/app/ProgressDialog;-><init>(Landroid/content/Context;)V

    iput-object v1, p0, Lcom/netease/newsreader/activity/SettingsActivity;->progressDialog:Landroid/app/ProgressDialog;

    .line 106
    return-void
.end method

.method protected onDestroy()V
    .locals 1

    .prologue
    .line 420
    iget-object v0, p0, Lcom/netease/newsreader/activity/SettingsActivity;->progressDialog:Landroid/app/ProgressDialog;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/netease/newsreader/activity/SettingsActivity;->progressDialog:Landroid/app/ProgressDialog;

    invoke-virtual {v0}, Landroid/app/ProgressDialog;->isShowing()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 421
    iget-object v0, p0, Lcom/netease/newsreader/activity/SettingsActivity;->progressDialog:Landroid/app/ProgressDialog;

    invoke-virtual {v0}, Landroid/app/ProgressDialog;->dismiss()V

    .line 423
    :cond_0
    invoke-super {p0}, Landroid/preference/PreferenceActivity;->onDestroy()V

    .line 425
    iget-object v0, p0, Lcom/netease/newsreader/activity/SettingsActivity;->mThemeSettingsHelper:Lcom/netease/newsreader/util/ThemeSettingsHelper;

    invoke-virtual {v0, p0}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->unRegisterThemeCallback(Lcom/netease/newsreader/util/ThemeSettingsHelper$ThemeCallback;)V

    .line 426
    iget-object v0, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menuWindow:Landroid/widget/PopupWindow;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menuWindow:Landroid/widget/PopupWindow;

    invoke-virtual {v0}, Landroid/widget/PopupWindow;->isShowing()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 427
    iget-object v0, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menuWindow:Landroid/widget/PopupWindow;

    invoke-virtual {v0}, Landroid/widget/PopupWindow;->dismiss()V

    .line 430
    :cond_1
    return-void
.end method

.method public onKeyDown(ILandroid/view/KeyEvent;)Z
    .locals 5
    .parameter "keyCode"
    .parameter "event"

    .prologue
    const/4 v1, 0x1

    const/4 v4, 0x0

    .line 323
    invoke-virtual {p2}, Landroid/view/KeyEvent;->getRepeatCount()I

    move-result v2

    if-le v2, v1, :cond_0

    .line 324
    invoke-super {p0, p1, p2}, Landroid/preference/PreferenceActivity;->onKeyDown(ILandroid/view/KeyEvent;)Z

    move-result v1

    .line 343
    :goto_0
    return v1

    .line 326
    :cond_0
    iget-boolean v2, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menu_display:Z

    if-eqz v2, :cond_1

    .line 327
    iget-object v2, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menuWindow:Landroid/widget/PopupWindow;

    invoke-virtual {v2}, Landroid/widget/PopupWindow;->dismiss()V

    .line 328
    iput-boolean v4, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menu_display:Z

    goto :goto_0

    .line 331
    :cond_1
    const/16 v2, 0x52

    if-ne p1, v2, :cond_2

    .line 332
    invoke-virtual {p0}, Lcom/netease/newsreader/activity/SettingsActivity;->getListView()Landroid/widget/ListView;

    move-result-object v2

    invoke-virtual {v2}, Landroid/widget/ListView;->getParent()Landroid/view/ViewParent;

    move-result-object v0

    check-cast v0, Landroid/view/View;

    .line 333
    .local v0, parent:Landroid/view/View;
    iget-object v2, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menuWindow:Landroid/widget/PopupWindow;

    invoke-virtual {v2}, Landroid/widget/PopupWindow;->isShowing()Z

    move-result v2

    if-nez v2, :cond_3

    .line 334
    iget-object v2, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menuWindow:Landroid/widget/PopupWindow;

    const/16 v3, 0x51

    invoke-virtual {v2, v0, v3, v4, v4}, Landroid/widget/PopupWindow;->showAtLocation(Landroid/view/View;III)V

    .line 335
    iput-boolean v1, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menu_display:Z

    .line 343
    .end local v0           #parent:Landroid/view/View;
    :cond_2
    :goto_1
    invoke-super {p0, p1, p2}, Landroid/preference/PreferenceActivity;->onKeyDown(ILandroid/view/KeyEvent;)Z

    move-result v1

    goto :goto_0

    .line 338
    .restart local v0       #parent:Landroid/view/View;
    :cond_3
    iget-object v1, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menuWindow:Landroid/widget/PopupWindow;

    invoke-virtual {v1}, Landroid/widget/PopupWindow;->dismiss()V

    .line 339
    iput-boolean v4, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menu_display:Z

    goto :goto_1
.end method

.method protected onPause()V
    .locals 1

    .prologue
    .line 316
    invoke-super {p0}, Landroid/preference/PreferenceActivity;->onPause()V

    .line 317
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menu_display:Z

    .line 318
    return-void
.end method

.method public onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z
    .locals 10
    .parameter "preferenceScreen"
    .parameter "preference"

    .prologue
    const/4 v9, 0x0

    const/4 v8, 0x1

    .line 115
    invoke-virtual {p2}, Landroid/preference/Preference;->getKey()Ljava/lang/String;

    move-result-object v4

    .line 117
    .local v4, key:Ljava/lang/String;
    if-eqz v4, :cond_0

    .line 119
    const-string v6, "account"

    invoke-virtual {v4, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-eqz v6, :cond_1

    .line 121
    new-instance v3, Landroid/content/Intent;

    const-class v6, Lcom/netease/newsreader/activity/AccountSettingActivity;

    invoke-direct {v3, p0, v6}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 122
    .local v3, intent:Landroid/content/Intent;
    invoke-virtual {p0, v3}, Lcom/netease/newsreader/activity/SettingsActivity;->startActivity(Landroid/content/Intent;)V

    .line 206
    .end local v3           #intent:Landroid/content/Intent;
    :cond_0
    :goto_0
    return v9

    .line 127
    :cond_1
    const-string v6, "cache"

    invoke-virtual {v4, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-eqz v6, :cond_2

    .line 129
    new-instance v6, Landroid/app/AlertDialog$Builder;

    invoke-direct {v6, p0}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    const-string v7, ""

    invoke-virtual {v6, v7}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    move-result-object v6

    const-string v7, "\u786e\u5b9a\u8981\u6e05\u9664\u7f13\u5b58\u5417\uff1f"

    invoke-virtual {v6, v7}, Landroid/app/AlertDialog$Builder;->setMessage(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    move-result-object v6

    .line 130
    const-string v7, "\u786e\u5b9a"

    new-instance v8, Lcom/netease/newsreader/activity/SettingsActivity$5;

    invoke-direct {v8, p0}, Lcom/netease/newsreader/activity/SettingsActivity$5;-><init>(Lcom/netease/newsreader/activity/SettingsActivity;)V

    invoke-virtual {v6, v7, v8}, Landroid/app/AlertDialog$Builder;->setPositiveButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v6

    .line 158
    const-string v7, "\u53d6\u6d88"

    .line 159
    new-instance v8, Lcom/netease/newsreader/activity/SettingsActivity$6;

    invoke-direct {v8, p0}, Lcom/netease/newsreader/activity/SettingsActivity$6;-><init>(Lcom/netease/newsreader/activity/SettingsActivity;)V

    .line 158
    invoke-virtual {v6, v7, v8}, Landroid/app/AlertDialog$Builder;->setNegativeButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v6

    .line 165
    invoke-virtual {v6}, Landroid/app/AlertDialog$Builder;->show()Landroid/app/AlertDialog;

    goto :goto_0

    .line 170
    :cond_2
    const-string v6, "autopost"

    invoke-virtual {v4, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-eqz v6, :cond_4

    .line 172
    iget-object v6, p0, Lcom/netease/newsreader/activity/SettingsActivity;->sp:Landroid/content/SharedPreferences;

    const-string v7, "autopost"

    invoke-interface {v6, v7, v8}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v1

    .line 174
    .local v1, autopost:Z
    iget-object v6, p0, Lcom/netease/newsreader/activity/SettingsActivity;->appdata:Lcom/netease/newsreader/activity/MyApplication;

    invoke-virtual {v6}, Lcom/netease/newsreader/activity/MyApplication;->getPushIntent()Landroid/content/Intent;

    move-result-object v5

    .line 175
    .local v5, pushIntent:Landroid/content/Intent;
    if-eqz v5, :cond_0

    .line 176
    if-eqz v1, :cond_3

    .line 177
    invoke-virtual {p0, v5}, Lcom/netease/newsreader/activity/SettingsActivity;->startService(Landroid/content/Intent;)Landroid/content/ComponentName;

    goto :goto_0

    .line 179
    :cond_3
    invoke-virtual {p0, v5}, Lcom/netease/newsreader/activity/SettingsActivity;->stopService(Landroid/content/Intent;)Z

    goto :goto_0

    .line 182
    .end local v1           #autopost:Z
    .end local v5           #pushIntent:Landroid/content/Intent;
    :cond_4
    const-string v6, "newguide"

    invoke-virtual {v4, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-eqz v6, :cond_5

    .line 183
    iget-object v6, p0, Lcom/netease/newsreader/activity/SettingsActivity;->sp:Landroid/content/SharedPreferences;

    invoke-interface {v6}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v6

    const-string v7, "newsreaderguide"

    invoke-interface {v6, v7, v8}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;

    move-result-object v6

    invoke-interface {v6}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 184
    iget-object v6, p0, Lcom/netease/newsreader/activity/SettingsActivity;->sp:Landroid/content/SharedPreferences;

    invoke-interface {v6}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v6

    const-string v7, "detailpageguide"

    invoke-interface {v6, v7, v8}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;

    move-result-object v6

    invoke-interface {v6}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 185
    invoke-virtual {p0}, Lcom/netease/newsreader/activity/SettingsActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    check-cast v0, Lcom/netease/newsreader/activity/MyApplication;

    .line 186
    .local v0, a:Lcom/netease/newsreader/activity/MyApplication;
    const-string v6, "Y"

    invoke-virtual {v0, v6}, Lcom/netease/newsreader/activity/MyApplication;->setGoHome(Ljava/lang/String;)V

    .line 187
    iget-object v6, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menuWindow:Landroid/widget/PopupWindow;

    invoke-virtual {v6}, Landroid/widget/PopupWindow;->dismiss()V

    .line 188
    iput-boolean v9, p0, Lcom/netease/newsreader/activity/SettingsActivity;->menu_display:Z

    .line 189
    new-instance v2, Landroid/content/Intent;

    invoke-direct {v2}, Landroid/content/Intent;-><init>()V

    .line 190
    .local v2, i:Landroid/content/Intent;
    const-class v6, Lcom/netease/newsreader/activity/NewsReader;

    invoke-virtual {v2, p0, v6}, Landroid/content/Intent;->setClass(Landroid/content/Context;Ljava/lang/Class;)Landroid/content/Intent;

    .line 191
    const/high16 v6, 0x400

    invoke-virtual {v2, v6}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    .line 192
    invoke-virtual {p0, v2}, Lcom/netease/newsreader/activity/SettingsActivity;->startActivity(Landroid/content/Intent;)V

    goto/16 :goto_0

    .line 193
    .end local v0           #a:Lcom/netease/newsreader/activity/MyApplication;
    .end local v2           #i:Landroid/content/Intent;
    :cond_5
    const-string v6, "about"

    invoke-virtual {v4, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-eqz v6, :cond_6

    .line 194
    new-instance v3, Landroid/content/Intent;

    const-class v6, Lcom/netease/newsreader/activity/AboutInfo;

    invoke-direct {v3, p0, v6}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 195
    .restart local v3       #intent:Landroid/content/Intent;
    invoke-virtual {p0, v3}, Lcom/netease/newsreader/activity/SettingsActivity;->startActivity(Landroid/content/Intent;)V

    goto/16 :goto_0

    .line 196
    .end local v3           #intent:Landroid/content/Intent;
    :cond_6
    const-string v6, "feedback"

    invoke-virtual {v4, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-eqz v6, :cond_0

    .line 197
    new-instance v3, Landroid/content/Intent;

    const-class v6, Lcom/netease/newsreader/activity/FeedBackActivity;

    invoke-direct {v3, p0, v6}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 198
    .restart local v3       #intent:Landroid/content/Intent;
    invoke-virtual {p0, v3}, Lcom/netease/newsreader/activity/SettingsActivity;->startActivity(Landroid/content/Intent;)V

    goto/16 :goto_0
.end method

.method protected onResume()V
    .locals 2

    .prologue
    const/4 v1, 0x0

    .line 260
    invoke-super {p0}, Landroid/preference/PreferenceActivity;->onResume()V

    .line 261
    iput-boolean v1, p0, Lcom/netease/newsreader/activity/SettingsActivity;->mPaused:Z

    .line 262
    iget-boolean v0, p0, Lcom/netease/newsreader/activity/SettingsActivity;->mThemeChanged:Z

    if-eqz v0, :cond_0

    .line 263
    iput-boolean v1, p0, Lcom/netease/newsreader/activity/SettingsActivity;->mThemeChanged:Z

    .line 264
    invoke-virtual {p0}, Lcom/netease/newsreader/activity/SettingsActivity;->onApplyTheme()V

    .line 288
    :cond_0
    return-void
.end method
